import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';

class DecoratedBoxDemo extends StatelessWidget{
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text('DecoratedBox'),
        centerTitle: true,
      ),
      body:Center(
        child: DecoratedBox(
          decoration: BoxDecoration(
            //渐变
            gradient: LinearGradient(colors: [Colors.red,Colors.orange.shade700]),
            //圆角
            borderRadius: BorderRadius.circular(3.0),
            //阴影
            boxShadow: [
              BoxShadow(
                color: Colors.black54,
                offset: Offset(2.0,2.0),
                blurRadius: 4.0
              )
            ],

          ),
          child: Padding(
            padding: EdgeInsets.symmetric(horizontal: 80,vertical: 18),
            child: Text('Login',style: TextStyle(color: Colors.white),),
          ),
        ),
      ) ,
    );
  }

}